<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>test request</title>
    <script>
        function divadd(object){

        }
        function divdel(object){

        }
        function send(){
            var xmlHttp = new XMLHttpRequest();
            xmlHttp.open("post", "/MyHttpRequest" , true);
            xmlHttp.send("fname=Henry&lname=Ford");
            xmlHttp.onreadystatechange = function(){
                document.getElementById("response").innerHTML = xmlHttp.responseText;
            }
        }
    </script>
</head>
<body>
    <h1>创建测试</h1>
    <from>
        <h2>请求方式post或get</h2><br/>
        <lable>url: <input name="url" type="text" value="http://" style="width: 200px;"/></lable><br/>
        <lable><input name="method" type="radio" />get</lable>
        <lable><input name="method" type="radio" />post</lable>
        <lable>参数</lable><br/>
        <div id="par">
            <div id="p[0]">
                <lable>key</lable><input name="key[0]" type="text"/>
                <lable>value</lable><input name="value[0]" type="text"/>
                <input type="button" value="添加" onclick="divadd(this)"/>
                <input type="button" value="删除" onclick="divdel(this)"/>
            </div>
            <div id="p[1]">
                <lable>key</lable><input name="key[1]" type="text"/>
                <lable>value</lable><input name="value[1]" type="text"/>
                <input type="button" value="添加" onclick="divadd(this)"/>
                <input type="button" value="删除" onclick="divdel(this)"/>
            </div>
        </div>
        <input type="button" value="发送" onclick="send()"/>
    </from>
    <div id="response"></div>
</body>
</html>